import json

from xjlibrary.mdatetime.mtime2 import MDateTimeUtils
from xjlibrary.our_file_dir import BaseDir
outPathFile = r"D:\xujiang\download\jstor\download\article2\all2.big_json"
for line in BaseDir.read_file_r_mode_yield(r"D:\xujiang\download\jstor\download\article2\all.big_json"):
    lists = line.split("★")
    if len(lists) > 2:
        print("errr")
    htmls = lists[1]
    url = lists[0]

    sumDict = dict()
    sumDict['url'] = url
    sumDict["downdate"] = MDateTimeUtils.get_today_date_strings()
    sumDict['html'] = htmls

    line = json.dumps(sumDict, ensure_ascii=False).strip() + '\n'

    BaseDir.single_add_file(outPathFile, line)
